import java.util.Scanner;

/**
 * Created by Salted fish
 * Description:
 * User: 24539
 * Date：2021-07-30
 * Time: 0:25
 */
public class Test3 {
    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        int n = sn.nextInt();
        System.out.println(fn(n));
        fn(n);
    }
    public static int  fn(int n) {
        if (n==1) {
            return 1;
        }
        int ret = n*fn(n-1);
        return ret;
    }
}
